/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"38801FE4-4CA0-4678-A42D-D252F355E259"}
 */
var fOperacion = null;


/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"8C3DB4C5-77B2-41A1-84BF-328F91DD421F"}
 */
function confirmar(event) {
	var $win = application.getWindow('NUEVO_VALOR')
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B1C12F09-8D96-42BF-AB0C-D217C0892BE4"}
 */
function cancelar(event) {
	if (fOperacion == 'A')
		controller.deleteRecord()
	var $win = application.getWindow('NUEVO_VALOR')
	$win.hide()
	$win.destroy()
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"84D190C6-A235-464C-B953-98E8F525D6B5"}
 */
function onShow(firstShow, event) {
	elements.btn_cancelar.visible = (fOperacion == 'A')
}
